package main

import (
	"github.com/influxdata/influxdb-client-go/v2/api/write"
	"time"
	"utilsx/db/influxUtils"
)

func main() {
	var asd = "http://192.168.20.9:8086"
	influxClient := influxUtils.NewInfluxClient(asd, "E_vJE297onN_hRoouMSugZQOX8YH7BcsrwZbU2tgrkLYSRN8MCwwk-wk7A2g6D7kaIHWU_AGW37hL83Fq_F13A==").Init("emp", "eliza")
	for i := 0; i < 200; i++ {
		time.Sleep(time.Second)

		point := write.NewPoint("empshop", map[string]string{"ASAAA": "Gin"}, map[string]interface{}{
			"ok":   "ol",
			"ssss": "time" + string(rune(i)),
			"ss":   i,
		}, time.Now())

		influxClient.Write(point)

	}

}
